#ifndef PRODUCT_H
#define PRODUCT_H

#include <QApplication>
#include <QWidget>
#include <QStackedWidget>
#include <QGridLayout>
#include <QPushButton>
#include <QPixmap>
#include <QIcon>
#include <QMessageBox>
#include <QDir>
#include <QStringList>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QLabel>
#include<QMainWindow>
#include"payment.h"
#include "ui_payment.h"
#include <QDialog>
#include<QDebug>
#include<QtSql>
#include <QCoreApplication>
#include <QtSql/QSqlDatabase>
#include <QtSql/QSqlQuery>
#include <QtSql/QSqlError>
#include <QtSql/QSqlRecord>
#include <QList>
#include <QVariantMap>


namespace Ui {
class product;
}

class product : public QMainWindow
{
    Q_OBJECT

public:
    explicit product(QWidget *parent = 0);
    ~product();

private slots:
    void updateButtonStates();
    void onNextButtonClicked();
    void onPrevButtonClicked();
private:
    Ui::product *ui;
    void direct();
    //QStringList imagePaths; // 存储图片路径的列表

    QList<QPushButton*> buttons;
    QGridLayout *gridLayout;
     QStringList imagePaths;
     QStackedWidget *stackedWidget;
     int currentPage;
    QPushButton *prevButtonPtr;
    QPushButton *nextButtonPtr;
    QPixmap pixmap;
    payment *m_payment;
    void database();
    //QSqlDatabase *db;
    QList<QVariantMap> readDataFromDatabase(QSqlDatabase &db);
    QList<QVariantMap> dataList;
};

#endif // PRODUCT_H
